package cn.cvs.service;

import cn.cvs.pojo.SysUser;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface SysUserService {

    //依据account和password查询用户
    SysUser queryUser(String account,String password);

    //条件分页查询 realName + roleId
    List<SysUser> queryUsers(String realName,Integer roleId,Integer pageNo,Integer pageSize);

    //参与条件分页的总记录数
    int queryCount(String realName,Integer roleId);

    //添加用户
    int addUser(SysUser sysUser);

    //依据编号查询用户
    SysUser queryById(Integer id);

    //修改用户
    int updateUser(SysUser sysUser);

    //依据account查询用户的数量
    int queryUserCount(String account);

    //依据用户编号删除
    int delete(Integer id, HttpServletRequest request);

    //修改用户密码
    Integer updatePwd(Integer id,String password);
}
